package com.example.eurekaclient.api.impl;

import com.example.springapi.api.HelloServiceApi;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloServiceImpl implements HelloServiceApi {

    @Value("${server.port}")
    String port;

    @Override
    public String hello(@RequestParam("name")String name) {
        try {
            Thread.sleep(1000*10);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "hi " + name + " ,i am from port:" + port;
    }
}
